package com.yz.base.each;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * @author yuanzheng
 * @date 2020/8/17-19:38
 */
public class IteratorDemo {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("a", "b", "c", "d");
        Iterator it = list.iterator();
        while (it.hasNext()) {
            System.out.println(it.next());
        }
    }
}
